﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Client.model;
using Client.ViewModel;

namespace Client.View.userControl
{
	/// <summary>
	/// ClientDetailInfo.xaml에 대한 상호 작용 논리
	/// </summary>
	public partial class ClientUC: UserControl
	{
        public ClientUC()
		{
			this.InitializeComponent();
		}

        private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                if (e.AddedItems.Count > 0)
                    (this.DataContext as MainViewModel).UserSelected(e.AddedItems[0]);
            }
            catch (Exception ex) { 
            
            }
        }
	}
}